package org.example.json.builder;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.extern.jackson.Jacksonized;
import org.example.json.inspect.Probe;

import java.math.BigDecimal;

@Getter
@EqualsAndHashCode
//@JsonDeserialize(builder = Apple.AppleBuilder.class) // NOSONAR
public class Apple {
    private String name;
    private BigDecimal weight;

    @Jacksonized
    @Builder
    public Apple(String name, BigDecimal weight) {
        Probe.run(Apple.class, name, weight);
        this.name = name;
        this.weight = weight;
    }

//    @JsonPOJOBuilder(withPrefix = "") // NOSONAR
//    public static class AppleBuilder { // NOSONAR
//    } // NOSONAR
}
